//
//  SucessViewController.m
//  Jingjing
//
//  Created by user on 15/11/13.
//  Copyright © 2015年 Mikeshihua. All rights reserved.
//

#import "SucessViewController.h"
#import "ProductsDetailViewController.h"
@interface SucessViewController ()
@property (nonatomic,strong)UILabel     *successLab;
@property (nonatomic,strong)UIImageView    *successImg;
@property (nonatomic,strong)UIButton    *backBtn;
@end

@implementation SucessViewController
- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor hexStringToColor:@"#f3f3f3"];
    
    
    TopView *topView = [[TopView alloc]initWithFrame:CGRectMake(0.0f, 0.0f, SCREEN_WIDTH, 64.0f)];
    [topView setTitile:@"报名"];
    [self.view addSubview:topView];
    UIButton * backBtn = [[UIButton alloc]initWithFrame:CGRectMake(10.0f, 20.0f, 44.0f, 44.0f)];
    [backBtn setImage:[UIImage imageNamed:@"icon_back"] forState:UIControlStateNormal];
    [backBtn addTarget:self action:@selector(backBtnCLick:) forControlEvents:UIControlEventTouchUpInside];
    backBtn.titleLabel.textAlignment = NSTextAlignmentRight;
    [topView addSubview:backBtn];
    
    
    [self.view addSubview:self.successImg];
    [self.view addSubview:self.successLab];
   
    
}
- (void)backBtnCLick:(UIButton*)btn
{
    
    [self.navigationController popViewControllerAnimated:YES];
}

-(UIImageView *)successImg
{
    if (!_successImg) {
        _successImg = [[UIImageView alloc] initWithFrame:CGRectMake(0,0, 60.0f, 60.0f)];
        _successImg.center = CGPointMake(SCREEN_WIDTH/2, SCREEN_HEIGHT/2);
        _successImg.image = [UIImage imageNamed:@"img_success"];
    }
    return _successImg;
}
-(UILabel *)successLab
{
    if (!_successLab) {
        _successLab = [[UILabel alloc] initWithFrame:CGRectMake(0, 0,80.0f, 20.0f)];
        _successLab.center = CGPointMake(SCREEN_WIDTH/2, SCREEN_HEIGHT/2+40.0f);
        _successLab.text = @"报名成功";
        _successLab.textColor = kColorTEXT;
        _successLab.textAlignment=NSTextAlignmentCenter;
       
    }
    return _successLab;
}


@end
